<script setup lang="ts">
import { ref } from 'vue';

interface Props {
  id: string;
  value: any;
  videoType?: string | number;
  videoInfo?: any;
  cameraIndexCode?: string;
  cameraType?: string;
}

const props = defineProps<Props>();
const haikangH5VideoRef = ref(null);

const resizePlayer = () => {
  if (haikangH5VideoRef.value && haikangH5VideoRef.value.resizePlayer) {
    haikangH5VideoRef.value.resizePlayer();
  }
};

defineExpose({
  resizePlayer
});
</script>

<template>
  <haikangH5Video v-bind="props" ref="haikangH5VideoRef" v-if="videoType === '0'"></haikangH5Video>
  <video-player v-bind="props" v-else-if="videoType === '3'"></video-player>
</template>

<style scoped lang="scss"></style>
